<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="viewport"
	content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
<title>分类列表</title>
<script src="javascript/jquery.min.js"></script>
<script src="javascript/function.js"></script>
<link rel="stylesheet" href="stylesheet/style_v1.1.css">
</head>
<body>
	<div class="header-nemu">
		<p>分类列表</p>
	</div>
	<div class="con work-list padding-top60" id="classListShow"></div>
	<%@ include file="footer.jsp"%>
	<script>
	var typeId='<%=request.getParameter("parms.typeId")%>';
    $(function () {
    	queryClassList();
    });
	function queryClassList() {
		var params = "parms.typeId=" + typeId;
		$.ajax({
					type : 'post',
					url : 'cliffordAction!queryClassList.action',
					async : false,
					data : params, // 传给action的参数
					success : function(data) {
						if (data.result == 1) {
							if (data.resultData.size == '0') {
								document.getElementById("classListShow").innerHTML="";
								alert("未获取到分类信息");
							} else {
								var list = data.resultData.datalist;
								var html = "";
								for ( var i = 0; i < list.length; i++) {
									html += '<div class="col-6 list-work">';
									html += '<img src="'+list[i].classIcon+'" alt="">';
									html += '<p>'+list[i].className+'</p>';
									html += ' <a href="forwardPageParam_typeCliffordList.action?parms.classId='+list[i].classId+'">查看</a>';
									html += '</div>';
								}
								document.getElementById("classListShow").innerHTML = html;
							}
						} else {
							document.getElementById("classListShow").innerHTML="";
							alert(data.msg);
						}
					}
				});
	}
</script>
</body>
</html>